<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?php 
include_once 'admin/clsEssentials.php';
$objEssential = new clsEssentials();
$arrFeedBack = array();
$arrFeedBack = $objEssential->getFeedBack();
$divCount = count($arrFeedBack);
$height = ($divCount * 300);
$addstyle = "height:".$height."px"; 

$arrPackages = array();

$arrPackages = $objEssential->getAllPackages();


?>
<?php include 'common-files/user-head.php'; ?>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="gooeymenu.js"></script>
<link rel="stylesheet" href="css/styles.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="gooeymenu.css" />
<body>
<!-- Panel -->
 <div id="outlineborder">
 <div class="main">
 <?php include 'common-files/user-header-feedback.php'; ?>
 
 
     <div class="contenttop_cotactIs">
	    <div class="contenttopleft">
	      <?php include 'common-files/user-side-bar.php'; ?>
	   </div>
	 
<?php
/*
 * Page Name: Send Package Details page
 * Author: Avik Kundu
 * Created On : 19th Sept,2011
 * Modified On :
 * 
 */
include_once 'submitemail.php';
//error_reporting(1);

$cntP = 1;
$arrPackageDetails= array();
if(count($arrPackages)>0)
{
	foreach($arrPackages as $arrP)
	{
		$arrPackageDetails[$arrP['id']]= $arrP['plans']."\n Total Cost:".$arrP['price']."\n".$arrP['validity'];
		$cntP++;
	}
}
/*$arrPackageDetails = array(
	"1"=>"Quick Fix COMPLETE CARE \n Total Cost: $30 \n Instant with 7 days Validity",
	"2"=>"1 Month COMPLETE CARE \n Total Cost: $50 \n 1 month Validity",
	"3"=>"3 Months COMPLETE CARE \n Total Cost: $60 \n 3 months Validity",
	"4"=>"6 Months COMPLETE CARE \n Total Cost: $75 \n 6 months Validity",
	"5"=>"1 Year COMPLETE CARE \n Total Cost: $140 \n 1 year Validity",
	"6"=>"2 Years COMPLETE CARE \n Total Cost: $200 \n 2 years Validity",
	"7"=>"3 Years COMPLETE CARE \n Total Cost: $320 \n 3 years Validity",
	"8"=>"5 Years COMPLETE CARE \n Total Cost: $500 \n Lifetime (5 years) Validity",
);*/

?>

     
	   <div class="contenttopright">
	      <div id="maincontent">
		   <div id="contenthead">
		    Contact Us
		   </div>
		   <div id="linehead">
		   </div>
		   <div class="contenttext">
		     <div class="note"><b>Note:&nbsp;</b><i>Please Fill The Form Below And Our Technicians Will Get In Touch Shortly.</i></div>
		     <br /><br />
		     <div class="coutline">
                   <form action="#" method="post">
				   
		<label class="mcontact">First Name</label>
			<input name="txtFirstName" id="txtFirstName" type="text" value="" class="mcontact" style="margin-left:65px;" />
		<label class="mcontact">Last Name</label>
			<input name="txtLastName" id="txtLastName" type="text" value=""  class="mcontact" /><br />
		<label class="mcontact">Phone No</label>
			<input name="txtPhoneNo" id="txtPhoneNo" type="text" value="" class="mcontact" size="41" style="margin-left:72px;"/><br />
		<label class="mcontact">Email</label>
			<input name="txtEmailAddress" id="txtEmailAddress" type="text" value="" class="mcontact" size="41" style="margin-left:94px;"/><br />
		<label class="mcontact">Country</label>
			<input id="txtCountry" name="txtCountry" type="text" value=""   class="mcontact" style="margin-left:82px;"/>
		<label class="mcontact">State</label>
			<input name="txtStateName" id="txtStateName" type="text" value=""  class="mcontact" style="margin-left:50px;"/><br />
		<label class="mcontact">Best Time To Call</label>
			<input name="txtTimeFrom" id="txtTimeFrom" type="text" value="" class="mcontact" style="margin-left:24px;"/>
		<label class="mcontact">To</label>
			<input name="txtTimeTo" id="txtTimeTo" type="text" value="" class="mcontact" style="margin-left:66px;" /><br />
		<textarea readonly="readonly" name="txtAreaComments" id="txtAreaComments" cols="50" rows="5"  style=" text-align:left; margin-left:145px; margin-top:20px; ">
		
		<?php 
		
		if(isset($_REQUEST['id']))
		{
			echo "Hi,Please Call Me Back. \n Choice of Package:  ".$arrPackageDetails[$_REQUEST['id']]."\n"." Thanks.";
		}
		
		?>
		
		
		</textarea>
		<input name="Submit" type="button" value="Submit" id="btn" class="msubmit" onclick="sendContactUs()"  />
	    <input name="Reset" type="button" value="Reset" class="mreset"/>
		
		
       		 </form>
			 </div>
		   </div>
		  </div>
		 
	   </div>
<script type="text/javascript" language="javascript">

function sendContactUs()
{
	var fname = $("#txtFirstName").val();
	var lname = $("#txtLastName").val();
	var phone = $("#txtPhoneNo").val();
	var email = $("#txtEmailAddress").val();
	var comments = $("#txtAreaComments").val();
	var country  = $("#txtCountry").val();
	var state= $("#txtStateName").val();
	var timeFrom= $("#txtTimeFrom").val();
	var timeTo= $("#txtTimeTo").val();

	
	var strErrMsg = "";
	
	if(fname.length==0)
	{
		strErrMsg += "Please enter your first name.";
		strErrMsg +="\n";
	}
	
	if(email.length==0)
	{
		strErrMsg +="Please enter email address.";
		strErrMsg +="\n";
	}
	
	if(phone.length==0)
	{
		strErrMsg +="Please enter phone number.";
		strErrMsg +="\n";
	}
		
	if(comments.length==0)
	{
		strErrMsg +="Please enter your comment.";
		strErrMsg +"\n";
	}
	
	if(strErrMsg.length>0)
	{
		alert(strErrMsg);
		return false;
	}
	else
	{
		$.post("contact-save.php",{action:"save",fname:fname,lname:lname,phone:phone,email:email,comments:comments,country:country,state:state,timeFrom:timeFrom,timeTo:timeTo},function(data){
			//alert(data);
			if(data==1)
			{
				alert("Your Request has been sent to the our representative. We will contact you soon. Thank you for contacting us.");
			}
			else
			{
				alert("We are unable to send your request at this moment. Please try again later.");
			}
			
		},"text");
	}
	
}

</script>
</div>
<div class="bottomlinks">
  <?php include 'common-files/bottom-links.php'; ?>
</div>
<div class="footer">
   <?php include 'common-files/footer.php'; ?>
</div>
</div>
</div>
</body>
</html>